<div class="container text-center p-0">
    <div class="row row-cols-<?=$num ?> g-1">
        <?php foreach($images as $image){ 
            $t=basename($image);
        ?>
        <div class="col image-div"><a href="<?=$image ?>" title="<?=$t ?>"><img src="<?=laoha_thumb($image,$w,$h) ?>" class="w-100 img-thumbnail img-fluid"></a></div>
        <?php } ?>
    </div>
</div>